package com.artfighting.business.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.artfighting.business.CategoryBusiness;
import com.artfighting.dao.CategoryDAO;
import com.artfighting.model.Category;

/**
 * @author SUCCESS\tungo
 * @date 07/10/2013
 */
@Component
public class CategoryBusinessImpl implements CategoryBusiness {

	@Autowired CategoryDAO categoryDAO;
	
	/* (non-Javadoc)
	 * @see com.artfighting.business.CategoryBusiness#saveCategory(java.lang.String, java.lang.String)
	 */
	@Override
	public void saveCategory(String name, String ordinal) {
		Category category = new Category();
		category.setName(name);
		category.setOrdinal(ordinal);
		categoryDAO.save(category);
	}

}
